﻿using System.Collections.Generic;
using System.Web.Mvc;
using Kwd.Summary.Models;

namespace Kwd.Summary.ViewModels
{
  /// <summary>
  /// Viewmodel for editing part.
  /// </summary>
  /// <remarks>
  /// Adds strategy options for selection.
  /// </remarks>
  public class SummaryPartEditViewModel
  {
    public SummaryPartEditViewModel()
    {
      StrategyOptions = new List<SelectListItem>();
    }

    public SummaryPartEditViewModel(SummaryPart part)
      :this()
    {
      StrategyName = part.StrategyName;
      Flavor = part.Format;
      Text = part.Text;
    }

    public string StrategyName { get; set; }

    public string Text { get; set; }

    public string Flavor { get; set; }

    public IEnumerable<SelectListItem> StrategyOptions { get; set; }
  }
}